<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			/**
			 * @param {number[]} nums
			 * @param {number} val
			 * @return {number}
			 */
			var removeElement = function(nums, val) {
				for (let i = 0; i < nums.length; i++) {
					if (nums[i] == val) {
						nums.splice(i, 1);
						i--;
					}
				}
			};
			console.log(removeElement());
		</script>
	</body>
</html>
